package pl.edu.fuw.fft;

public class Util {

	public static double[][] generateSinusoidalSignal(double frequency, double 
			samplingFrequency, int samples) {
		double[] signal = new double[samples];
		double[] time = new double[samples];
		double[] freq = new double[samples];
		double dx = frequency/samplingFrequency;
		for (int i = 0; i < samples; i++) {
			signal[i] = Math.sin(i*dx*Math.PI*2);
			time[i] = i/samplingFrequency;
			freq[i] = i*samplingFrequency/samples;
		}
		double[][] wave = {signal, time, freq}; 
		return wave;
	}
}
